package com.leyou.search.config;


import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class MqConfig {


    @Bean
    public MessageConverter messageConverter(){
        //注册一个jackson的消息处理器，这样mq的发送和接收消息，都是以jackson类型进行
        return  new Jackson2JsonMessageConverter();
    }
}
